home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / IDL / ShapeB.idl < prev    next >
Encoding:
Text File  |  1997-01-01  |  2.8 KB  |  126 lines  |  [TEXT/MPS ]

  1. //#    Copyright:    © 1993-1995 by Apple Computer, Inc., all rights reserved.
  2.  
  3. #ifndef _SHAPEB_
  4. #define _SHAPEB_
  5.  
  6. #ifndef _REFCTOBJ_
  7. #include "RefCtObj.idl"  
  8. #endif
  9.  
  10. //==============================================================================
  11. // Classes defined in this interface
  12. //==============================================================================
  13.  
  14. interface ODBaseShape;
  15.  
  16. //==============================================================================
  17. // Classes used in this interface
  18. //==============================================================================
  19.  
  20. interface ODShape;
  21. interface ODTransform;
  22. interface ODStorageUnit;
  23.  
  24.  
  25.  
  26. //==============================================================================
  27. // ODBaseShape
  28. //==============================================================================
  29.  
  30. interface ODBaseShape :  ODRefCntObject
  31. {
  32.     
  33.     //#---------------------------------
  34.     //# factories:
  35.  
  36.     ODShape            NewShape();
  37.     ODShape            Copy();
  38.  
  39.     //#---------------------------------
  40.     //# getters/setters
  41.     
  42.     ODGeometryMode    GetGeometryMode();
  43.     void            SetGeometryMode(in ODGeometryMode mode);
  44.     void            GetBoundingBox(out ODRect bounds);
  45.     ODShape            SetRectangle(in ODRect rect);
  46.     void            CopyPolygon(out ODPolygon copy);
  47.     ODShape            SetPolygon(in ODPolygon polygon);
  48.     ODPlatformShape    GetPlatformShape(in ODGraphicsSystem graphicsSystem);
  49.     void            SetPlatformShape(in ODGraphicsSystem graphicsSystem,
  50.                                       in ODPlatformShape platformShape);
  51.     void            Reset();
  52.     
  53.     //#---------------------------------
  54.     //# input / output:
  55.     
  56.     void            WriteShape(in ODStorageUnit storageUnit);
  57.     ODShape            ReadShape(in ODStorageUnit storageUnit);
  58.     
  59.     //#---------------------------------
  60.     //# comparison/testing functions
  61.     
  62.     ODBoolean        IsSameAs(in ODShape compareShape);
  63.     ODBoolean        IsEmpty();
  64.     ODBoolean        ContainsPoint(in ODPoint point);
  65.     ODBoolean        IsRectangular();
  66.     ODBoolean        HasGeometry();
  67.     
  68.     //#---------------------------------
  69.     //# geometry operations
  70.     
  71.     void        CopyFrom(in ODShape sourceShape);
  72.     ODShape        Transform(in ODTransform transform);
  73.     ODShape        InverseTransform(in ODTransform transform);
  74.     ODShape        Subtract(in ODShape diffShape);
  75.     ODShape        Intersect(in ODShape sectShape);
  76.     ODShape        Union(in ODShape unionShape);
  77.     ODShape        Outset( in ODCoordinate distance );
  78.       
  79. #ifdef __SOMIDL__
  80.     implementation
  81.     {
  82.         override:
  83.             somUninit,
  84.             Purge,
  85.             Release;
  86.             
  87.         releaseorder:
  88.             SetGeometryMode,
  89.             GetGeometryMode,
  90.             GetBoundingBox,
  91.             SetRectangle,
  92.             CopyPolygon,
  93.             SetPolygon,
  94.             GetPlatformShape,
  95.             SetPlatformShape,
  96.             WriteShape,
  97.             ReadShape,
  98.             IsSameAs,
  99.             IsEmpty,
  100.             ContainsPoint,
  101.             IsRectangular,
  102.             HasGeometry,
  103.             Copy,
  104.             CopyFrom,
  105.             Transform,
  106.             InverseTransform,
  107.             Subtract,
  108.             Intersect,
  109.             Union,
  110.             Outset,
  111.             NewShape,
  112.             Reset,
  113.             reserved1,
  114.             reserved2;
  115.         
  116.             
  117.         majorversion = 1; minorversion = 0;
  118.         
  119.         functionprefix = ODBaseShape__;
  120.         
  121.     };
  122. #endif
  123. };
  124.  
  125. #endif // _SHAPE_
  126.